According to MPEG, GOP may include one or more I pictures the number of which is particularly not limited. The number of pictures within GOP in NTSC is generally fifteen (0.5 second), and sometimes all pictures are included in one GOP. In the system of JP-A-9-247620, since all pictures are included in the same GOP, cutting out (editing) is impossible. As the number of pictures within one GOP increases, MPEG data is extracted at a position separated from the range that is specified as mark-in and mark-out by the user.
In order to solve this problem, it can be considered to edit for each picture. In this method, since editing is made for each picture, moving picture data for edition can be extracted from a necessary minimum range. However, when a B picture is designated for mark-in or mark-out, it is always to be decoded and re-encoded so that it can be extracted in a reproducible form even if there is no previous or following picture. Therefore, it takes a longer time than in the editing for each GOP.
It is an object of the invention to provide an editing method and apparatus capable of automatically extracting a part of compressed moving picture data in order that the start and end points of the part can be respectively made as near to those specified for editing by user as possible.
The present invention achieves the above object in such a way as described below. In a method and apparatus for editing moving picture data by use of an editing engine, when a picture to be specified for the editing start position is encoded by referring to another picture out of the editing range, the start position is changed to that referenced I picture or I picture after the start position. In addition, when a picture to be specified for the editing end position is encoded by referring to another picture out of the editing range, the end position is changed to a position including or not-including that reference picture. This method needs no decoding and re-encoding process when editing is performed, and thus makes it possible to reduce the time taken to edit.
Moreover, when the MPEG data to be edited is an MPEG system stream, the editing start and end positions of the audio stream data are changed with the change of those of the video stream. Accordingly, the video stream can be prevented from becoming out of synchronism with the audio stream when the editing positions for the video stream are changed, with the result that the editing process can be properly conducted.
In addition, the editing start and end positions can be specified according to the editing position designation guide information indicated on a display. This guide information enables the pictures to be specified and edited more adequately.